session has laravel blade

55

session has laravel blade -

@if(Session::has('error'))
<div class="alert alert-danger">
  {{ Session::get('error')}}
</div>
@endif

how to use a session in blade -

{{ request()->session()->get('key') }}

Comments

Submit
0 Comments